-- @Author: baidwwy
-- @Date:   2018-05-09 22:40:23
-- @Last Modified by:   baidwwy
-- @Last Modified time: 2018-05-16 11:06:45


local GGELUA = class(require"gge纹理类")
GGELUA._load = false

function GGELUA:初始化(var,...)
    if type(var) == 'string' then
        if #var<256 then
            var = __gge.readfile(var)
        end
        local flip = ...
        assert(self._obj:Texture_LoadWebp(var,flip and 1 or 0), '载入失败')
    elseif type(var) == 'number' then
        local size,flip = ...
        assert(self._obj:Texture_LoadWebptr(var,size,flip and 1 or 0), '载入失败')
    elseif type(var) == 'cdata' then
        var = ffi.getptr(var)
        local size,flip = ...
        assert(self._obj:Texture_LoadWebptr(var,size,flip and 1 or 0), '载入失败')
    end

end



return GGELUA